export interface IDoc {
  swagger?: string;
  host?: string;
  basePath?: string;
  definitions?: IDefinition | any;
  info?: IInfo | any;
  paths?: any;
  tags?: ITag[] | any[];
}

export interface IPath {
  [key: string]: IPathData | any;
}

export interface IPathData {
  get?: IPathInfo | any;
  post?: IPathInfo | any;
  put?: IPathInfo | any;
  delete?: IPathInfo | any;
  [key: string]: IPathInfo | any;
}

export interface IPathInfo {
  operationId?: string;
  summary?: string;
  consumes?: MimeEnum[] | string[];
  produces?: MimeEnum[] | string[];
  tags?: string[];
  responses?: IResponse[] | any[];
  parameters?: IParameter[] | any[];
}

export interface IParameter {
  name?: string;
  in?: InEnum | string;
  default?: string;
  description?: string;
  required?: boolean;
  type?: PTypeEnum | string;
  schema?: ISchema | any;
}

export interface IResponse {
  [key: number]: IResponseData | any;
}

export interface IResponseData {
  description?: string;
  schema?: ISchema | any;
}

export interface ISchema {
  $ref?: string;
  type?: string;
}

export interface IInfo {
  title?: string;
  version?: string;
  license?: any;
  description?: string;
  termsOfService?: string;
  contact?: IInfoContact | any;
}

export interface IInfoContact {
  name: string;
}

export interface ITag {
  name: string;
  description?: string;
  [key: string]: any;
}

export interface IDefinition {
  [key: string]: IDefinitionData | any;
}

export interface IDefinitionData {
  properties?: IDefinitionProperties | any;
  type?: PTypeEnum | string;
  additionalProperties?: IDefinitionProperty | any;
  required?: string[];
}

export interface IDefinitionProperties {
  [key: string]: IDefinitionProperty | any;
}

export interface IDefinitionProperty {
  key?: string;
  type?: PTypeEnum | string;
  format?: PForamtEnum | string;
  description?: string;
  $ref?: string;
  items?: IDefinitionProperty;
}

export enum ResponseCodeEnum {
  C200 = 200,
  C401 = 401,
  C403 = 403,
  C404 = 404
}

export enum InEnum {
  Header = 'header',
  Body = 'body',
  FormData = 'formData',
  Query = 'query'
}

export enum MimeEnum {
  Any = '*/*',
  Json = 'application/json',
  FormData = 'multipart/form-data',
}

export enum PTypeEnum {
  Integer = 'integer',
  String = 'string',
  Object = 'object',
  Boolean = 'boolean',
  Array = 'array',
  File = 'file'
}

export enum PForamtEnum {
  DateTime = 'date-time',
  Int64 = 'int64',
  Int32 = 'int32'
}
